<script setup>
    import { onMounted, onUpdated, ref } from "vue";

    onMounted(()=>{
        console.log("onMounted");
    })

    onUpdated(()=>{
        console.log("onUpdated");
    })

    const user = ref(0)
    console.log(user);

    const userAdd = ()=>{
        user.value++
    }
</script>

<template>
    user: {{ user }}
    <button @click="userAdd">添加用户</button>
</template>

<style scoped>

</style>